import React, { useCallback, useEffect, useState } from 'react'
import $axios from '@/plugins/request'
import UserForm from './UserForm'
function Edit(props) {
  const [data, setData] = useState([]);
  const getData = useCallback(async () => {
    const { id } = props.match.params;
    const { data } = await $axios.get(`/api/party/${id}`)
    setData(data.data)
    console.log("data", data);
  })
  useEffect(() => {
    getData();
  }, [])
  return (
    <UserForm data={data}></UserForm>
  )
}
export default Edit;
